# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org>
pkgname=parallel
pkgver=20220622
pkgrel=0
pkgdesc="Shell tool for executing jobs in parallel"
arch="noarch"
url="https://www.gnu.org/software/parallel"
license="GPL-3.0-or-later"
options="!check" # Test suite not part of src pkg
depends="autoconf automake perl"
subpackages="$pkgname-doc $pkgname-bash-completion $pkgname-zsh-completion"
source="https://ftp.gnu.org/gnu/parallel/parallel-$pkgver.tar.bz2
	completion-dir.patch
	"

prepare() {
	default_prepare
	autoreconf -fvi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
d01d86cd2ac373534d147eee8aa666fe26e7207362ea9c036c3744125f72c936d15cf2059429636454f21c8e8c6b3a60c8d761ddfde97ba7388d2cd00495bfa4  parallel-20220622.tar.bz2
9c44648d220d2c9eb15e5d0dca25f0a62091f8f9e1233df04d31639c7833ddc1d60a654a261b352a37894f4ed445f5c26ce39cbe145982cfc95991ad873de0fc  completion-dir.patch
"
